﻿
using Model.ModelDto;
using RapidProject.Pages.Ultrasound;
using Service.DI;
using System.Collections.ObjectModel;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ViewModel;

namespace RapidProject
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window, ISingletonService
    {
        private readonly MainWindowViewModel _mainWindowViewModel;

        private readonly UltrasoundView _ultrasoundView;
        public MainWindow(MainWindowViewModel mainWindowViewModel, UltrasoundView ultrasoundView)
        {
            InitializeComponent();

            mainWindowViewModel.MenuItems = new ObservableCollection<MenuModelOutputDto>
            {
                new MenuModelOutputDto {  Title = "🏠 首页", Page =  ultrasoundView },
            };
            // 默认选中第一个
            mainWindowViewModel.SelectedMenuItem = mainWindowViewModel.MenuItems[0];

            _mainWindowViewModel = mainWindowViewModel;
            DataContext = mainWindowViewModel;
        }
    }
}